Build a data mapping only for the csv, html and xml providers. Any
other provider name in the document is ignored.
The sql provider is not included. It never worked and was dropped from
the Data Provider dialog in tdf#169079.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaa8b5ae4f37693d82938c12b725ee05a3b115732
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6708
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit
9b6d7ec607e68c79ce685f126139ef826776e783)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208149
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit
104d2b4f5dae917661b20b18d5d2043fca4407e4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208159
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Gbp-Pq: Name CVE-2026-63268-2.diff
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlnamespace.hxx>
+#include <sal/log.hxx>
#include <datamapper.hxx>
#include <document.hxx>
if (!aProvider.isEmpty())
{
+ // Only build the data providers we support. The sql provider is left
+ // out: it was never finished and was dropped from the dialog in tdf#169079.
+ if (aProvider != "org.libreoffice.calc.csv"
+ && aProvider != "org.libreoffice.calc.html"
+ && aProvider != "org.libreoffice.calc.xml")
+ {
+ SAL_WARN("sc", "ignoring document data mapping for provider \"" << aProvider << "\"");
+ return;
+ }
+
ScDocument* pDoc = GetScImport().GetDocument();
auto& rDataMapper = pDoc->GetExternalDataMapper();
sc::ExternalDataSource aSource(aURL, aProvider, pDoc);